using System;
using System.Collections.Generic;
using System.Text;

namespace Survive.Library
{
    public class SpaceBuilder
    {
        Model model;
        Space space;

        internal SpaceBuilder(Model model, Space space)
        {
            this.model = model;
            this.space = space;
        }

        public SpaceBuilder AdjacentTo(params int[] spaceIds)
        {
            foreach (int spaceId in spaceIds)
            {
                Space adjacentSpace = model.AddOrGetSpace(spaceId);

                // Add adjacencies to adjacency list on space
                space.AddAdjacentSpace(adjacentSpace);
            }

            return this;
        }
    }
}
